Attribute VB_Name = "modDoesHTTPFileExist"
Function DoesHTTPFileExist(ByVal URL As String) As Boolean
    Dim HTTP As Inet
    
    Dim S As String
    Dim Exists As Boolean

Set HTTP = New Inet
    With HTTP
        .protocol = icHTTP
        .URL = URL
        .Execute
        Do While .StillExecuting
            DoEvents
        Loop
        S = UCase(.GetHeader())
        Exists = (InStr(1, S, "200 OK") > 0)
    End With
    Set HTTP = Nothing
    DoesHTTPFileExist = Exists
End Function

